# the minimum version of CMake.
cmake_minimum_required(VERSION 3.4.1)
project(rajawali)
if(CMAKE_BUILD_TYPE AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
    set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
endif()

set(lib_DIR ${PROJECT_SOURCE_DIR}/../../../../entry/libs/${OHOS_ARCH})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/../../../../rajawali/libs/${OHOS_ARCH})
include_directories(${CMAKE_SOURCE_DIR}/includes)

file(GLOB_RECURSE CPP_SRCS *.cpp)
add_library(glutils SHARED ${CPP_SRCS})
find_library(log-lib hilog_ndk.z)
find_library(image-lib image_pixelmap.z)
find_library(mm-lib m)
find_library(egl-lib EGL)
find_library(gles3-lib GLESv3)
find_library(gra-lib zgraphic.z)
target_link_libraries(glutils  ${image-lib} ${mm-lib} ${gra-lib} ${log-lib} ${egl-lib} ${gles3-lib})
